package com.itheima.domain;

public class Result {
    private Integer code;  //响应码
    private Object data; //封装成功的数据
    private  String messgage;//封装错误信息

    public Result() {}

    public Result(Integer code, Object data, String messgage) {
        this.code = code;
        this.data = data;
        this.messgage = messgage;
    }

    public Result(Integer code, String messgage) {
        this.code = code;
        this.messgage = messgage;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public String getMessgage() {
        return messgage;
    }

    public void setMessgage(String messgage) {
        this.messgage = messgage;
    }

    @Override
    public String toString() {
        return "Result{" +
                "code=" + code +
                ", data=" + data +
                ", messgage='" + messgage + '\'' +
                '}';
    }
}
